<?php
require_once ($_SERVER['DOCUMENT_ROOT'] . '/common/all_setup_first.php');
require_once ($_SERVER['DOCUMENT_ROOT'] . '/class/db/DB.php');
require_once ($_SERVER['DOCUMENT_ROOT'] . '/class/other/Message.php');
require_once ($_SERVER['DOCUMENT_ROOT'] . '/class/friend/Friend.php');
require_once ($_SERVER['DOCUMENT_ROOT'] . '/common/function_common.php');

$obj_conn = new DB();
$obj_Friend = new Friend();

$arr_input['baby_id'] = $login_id;
$arr_friend_list = $obj_Friend->getFriendList($obj_conn,$arr_input);
?>
<body>
<form action="send_proc.php" method="POST">
<input name="hid" type="hidden" value="<?php echo $arr_friend_list[0][3]; ?>">
<table>
<tr><td>sendTo:
<select name="baby_fid" onchange="hid.value=this.options[this.selectedIndex].name">
<?php
$count = count($arr_friend_list);
for($i=0;$i<$count;$i++){
	echo '<option value="',$arr_friend_list[$i][1],'" name="',$arr_friend_list[$i][3],'">',$arr_friend_list[$i][3],'</option>';
}
?>     
</select>
</td></tr>
<tr><td>title:<input type="text" name="title" /></td></tr>
<tr><td>message:<textarea name="message"></textarea></td></tr>
<tr><td><input type="submit" name="submit" value="submit" /></td></tr>
</table>
</form>
</body>